/*    */ package com.zimbra.cs.account.accesscontrol;
/*    */ 
/*    */ import com.zimbra.common.localconfig.KnownKey;
/*    */ import com.zimbra.common.localconfig.LC;
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.cs.account.accesscontrol.generated.AdminRights;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public abstract class AdminRight
/*    */   extends Right
/*    */ {
/*    */   public static AttrRight PR_GET_ATTRS;
/*    */   public static AttrRight PR_SET_ATTRS;
/*    */   public static AdminRight PR_ALWAYS_ALLOW;
/*    */   public static AdminRight PR_SYSTEM_ADMIN_ONLY;
/*    */   public static AdminRight PR_ADMIN_PRESET_RIGHT;
/*    */   
/*    */   static void init(RightManager rm)
/*    */     throws ServiceException
/*    */   {
/* 42 */     PR_GET_ATTRS = (AttrRight)newAdminSystemRight("PSEUDO_GET_ATTRS", Right.RightType.getAttrs);
/* 43 */     PR_SET_ATTRS = (AttrRight)newAdminSystemRight("PSEUDO_SET_ATTRS", Right.RightType.setAttrs);
/*    */     
/* 45 */     PR_ALWAYS_ALLOW = newAdminSystemRight("PSEUDO_ALWAYS_ALLOW", Right.RightType.preset);
/* 46 */     PR_SYSTEM_ADMIN_ONLY = newAdminSystemRight("PSEUDO_SYSTEM_ADMIN_ONLY", Right.RightType.preset);
/* 47 */     PR_ADMIN_PRESET_RIGHT = newAdminSystemRight("PSEUDO_ADMIN_PRESET_RIGHT", Right.RightType.preset);
/*    */     
/* 49 */     if (LC.zimbra_rights_delegated_admin_supported.booleanValue())
/* 50 */       AdminRights.init(rm);
/*    */   }
/*    */   
/*    */   protected AdminRight(String name, Right.RightType rightType) {
/* 54 */     super(name, rightType);
/*    */   }
/*    */   
/*    */   static AdminRight newAdminSystemRight(String name, Right.RightType rightType) throws ServiceException {
/* 58 */     return newAdminRight(name, rightType);
/*    */   }
/*    */   
/*    */   private static AdminRight newAdminRight(String name, Right.RightType rightType) throws ServiceException {
/* 62 */     if ((rightType == Right.RightType.getAttrs) || (rightType == Right.RightType.setAttrs))
/* 63 */       return new AttrRight(name, rightType);
/* 64 */     if (rightType == Right.RightType.combo) {
/* 65 */       return new ComboRight(name);
/*    */     }
/* 67 */     return new PresetRight(name);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/accesscontrol/AdminRight.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */